package cn.jinzhu.springcloudconfigclient;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
//开启分布式配置中心报错重试
@RestController
//自动刷新
@RefreshScope
public class HelloController {

    @Value("${jinzhu}") //这是分布式配置中心里面的文件内容
    private  String jinzhu;
    @GetMapping("/hello")
    public  String hello(){
        return jinzhu;
    }

}
